<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>招生统计</title>
    <!-- 引入 echarts.js -->
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
</head>
<body>
<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    let myChart = echarts.init(document.getElementById('main'));


    option = {
        color:['#5b9bd5','#ed7d31','#FF00FF','#CD5C5C'],
        backgroundColor: '#FFF',
        grid:{

            top:20,
            bottom:80,
            left:'10%',
            right:20
        },
        legend: {
            bottom:'10',
            itemWidth:10,
            itemHeight:10,
            data:['夏天','李默','张默','李代沫']
        },
        xAxis: [
            {
                name:'月份',
                nameLocation:'center',
                nameGap: 30,
                axisLine:{
                    show:false
                },
                axisTick:{
                    show:false
                },
                splitLine: {
                    show:true,
                    lineStyle:{
                        color:'#CCC'
                    }
                },
                data: ['1','2','3','4','5','6','7','8','9','10','11','12'],
            }
        ],
        yAxis: [
            {

                name: 'AQI',
                nameLocation:'center',
                nameGap: 40,
                nameTextStyle:{
                    color:'#000'
                },
                axisLine:{
                    lineStyle:{
                        color:'#CCC'
                    },
                },
                axisTick:{
                    show:false
                },
                splitLine: {
                    show:true,
                    lineStyle:{
                        color:'#CCC'
                    }
                },
                axisLabel:{
                    color:'#000'
                }
            }
        ],
        series: [
            {
                name:'夏天',
                type:'bar',
                data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
            },
            {
                name:'李默',
                type:'bar',
                data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
            },
            {
                name:'张默',
                type:'bar',
                data:[1.8, 6.7, 5.0, 22.7, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
            },
            {
                name:'李代沫',
                type:'bar',
                data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
            }
        ]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>
</body>
</html>